<template>
  <div>
    <el-form ref="EditForm" :model="formModel" label-width="100px" :rules="validate">
      <el-row>
        <el-col :span="12">
          <el-form-item label="岗位名称:" prop="name">
            <el-input
              v-model="formModel.name"
              placeholder="岗位名称"
              maxlength="20"
              show-word-limit
              clearable
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="岗位编号:" prop="code">
            <el-input
              v-model="formModel.code"
              placeholder="岗位编号"
              maxlength="20"
              show-word-limit
              clearable
            />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="岗位排序:">
            <el-input-number v-model="formModel.sort" style="width: 100%;" :step="1" :max="100" :min="0" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="岗位状态:" prop="status">
            <el-radio-group v-model="formModel.status">
              <el-radio v-for="(value,key,index) in getSystemDictionariesByType('USESTATUS')" :key="index" :label="key" border>{{ value }}</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="岗位备注:" prop="remarks">
            <el-input
              v-model="formModel.remarks"
              type="textarea"
              resize="none"
              rows="5"
              placeholder="备注"
              show-word-limit
              maxlength="255"
              clearable
            />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
  name: 'EditForm',
  components: {},
  props: {
    formModel: {
      type: Object
    },
    validate: {
      type: Object
    }
  },
  data() {
    return {
    }
  },
  computed: {
    ...mapGetters({
      'getSystemDictionariesByType': 'dictionaries/getSystemDictionariesByType'
    })
  },
  mounted() {},
  methods: {

  }
}

</script>
<style lang='scss' scoped>
</style>
